/*
    name: 自定义事件类
 */
class BaseEvent extends egret.Event{
    public CLASS_NAME:string = "BaseEvent";
    private _obj;
    public constructor(type:string, obj:Object = null, bubbles:boolean = false, cancelable:boolean = false){
        super(type, bubbles, cancelable);
        if(obj){
            this._obj = obj;
        }
    }

    public clone(obj?:Object):BaseEvent{
        return new BaseEvent(this.type, obj?obj:this._obj, this.bubbles, this.cancelable);
    }

    public toString():void{
        LogUtil.log(this.CLASS_NAME, "type", "bubbles", "cancelable");
    }

    /**
     * 传参获取
     * @returns {Object}
     */
    public get param(){
        return this._obj;
    }
}
